//
// Created by chen on 2023/4/15.
//
#include "iostream"
#include "circle.h"
#include "point.h"
using namespace std;

void Circle::calcLocate(Point p) {
    float distance =(p.p_x-c_p.p_x)*(p.p_x-c_p.p_x)+(p.p_y-c_p.p_y)*(p.p_y-c_p.p_y);
    cout << "distance=" << distance << "，c_r= " << c_r << endl;
    if(distance > c_r*c_r) {
        cout << "点在圆外" << endl;
    }else if(distance < c_r*c_r) {
        cout << "点在圆内" << endl;
    } else {
        cout << "点在圆上" << endl;
    }
}
